import request from "../ulits/request";


///api/menuInfo/getAllMenuInfo
export function menuInfo(roleId) {
  return request({
    method:"get",
    url:"menuInfo/getMenuInfoByRoleId",
    params:{
      roleId
    }
  })
}
// 删除菜单
export function delMenu(id) {
  return request({
    method:"get",
    url:"menuInfo/delete",
    params:{id}
  })
}
//api/menuInfo/add 新增菜单
export function addMenu(data) {
  return request({
    method:"post",
    url:"menuInfo/add",
    data
  })
}



//api/roleInfo/getAllRoleInfo
// 获取所有管理员账号
export function getRole() {
  return request({
    method:"get",
    url:"roleInfo/getAllRoleInfo"
  })
}


//roleInfo/changeRoleInfo
// 禁用开启角色
export function changeRole(params) {
  return request({
    method:"post",
    url:"roleInfo/changeRoleInfo",
    params
  })
}

//roleInfo/update
export function updateRole(params) {
  return request({
    method:"get",
    url:"roleInfo/update",
    params
  })
}
